<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition >
            <p:panel >
                <h:panelGrid columns="1" >
                    <p:commandButton value="Novo Insert" 
                                     icon="iconNovo"
                                     id="btnNovo"
                                     action="#{compositorBean.novo()}"
                                     update=":geral:mensagem, :geral:pnlProcesso"/>

                </h:panelGrid>
            </p:panel>

            <br/>
            <p:dataTable id="dtcompositor" var="compositor" value="#{compositorBean.compositores}"
                         paginator="true" rows="15"
                         style="width: auto; height: auto"
                         emptyMessage="Sem Registros">
                <p:column headerText="Nome ">
                    <h:outputText value="#{compositor.nomeCompositor}"/>
                </p:column>
                <p:column headerText="Opções" width="60">
                    <p:commandButton value="Excluir Compositor" 
                                     action="#{compositorBean.irExcluir()}"
                                     update=":geral:mensagem, :geral:pnlProcesso">
                        <f:setPropertyActionListener 
                            target="#{compositorBean.compositor}" 
                            value="#{compositor}"/>
                    </p:commandButton>
                </p:column>
            </p:dataTable>
        </ui:composition>

    </body>
</html>
